package cn.edu.scau.cmi.chenzehan.singlepattern;
public class HeadMaster {

	private String name;
	private static HeadMaster  headMaster = null;
	private HeadMaster() {
		
	}
	private HeadMaster(String name) {
		this.name=name;
	}
    public static boolean addHeadMaster(String name) {
		if(headMaster == null) {
			headMaster = new HeadMaster(name);
			return true;
		}
		else {
			return false;
		}
	}
    public static void setHeadMasterEmpty() {
    	headMaster = null;
    }
}